package cn.xiuxius.embedded.keil;

import lombok.Getter;

@Getter
public enum RTOS {
    NONE(0),
    RTX_51_TINY(1),
    RTX_51_FULL(2);

    private final int num;

    RTOS(int num) {
        this.num = num;
    }

    public static RTOS fromNum(int num) {
        for (RTOS rtos : values()) {
            if (rtos.num == num) {
                return rtos;
            }
        }
        return NONE;
    }

}
